package com.sf.fy.uav.common.enums;

import lombok.Getter;

@Getter
public enum ActivityProductTypeEnum {
    LOCAL("同城即时达", (byte) 0),
    CROSS_REGION("跨城飞送", (byte) 1),
    SPECIAL_PLANE("专机送", (byte) 2);

    private String name;

    private Byte code;

    ActivityProductTypeEnum(String name, Byte code) {
        this.name = name;
        this.code = code;
    }


    public static String getName(Byte code) {
        for (ActivityProductTypeEnum ele : values()) {
            if (ele.getCode().equals(code)) {
                return ele.getName();
            }
        }
        return null;
    }
}
